//
//  LYPublicMethod.h
//  artist
//
//  Created by laotang on 16/4/4.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>
#import <AssetsLibrary/AssetsLibrary.h>
//#import "LYUserInfoModel.h"

@class LYUserInfoModel;
@class ECLoginInfo;
#define WS(weakSelf) __weak __typeof(&*self) weakSelf = self;
extern NSString *LYNoNullString(NSString *string);
extern NSString *LYURLString(NSString *);
extern UIColor *LYColorWithHexAndAlpha(long hexColor, float opacity);
extern UIColor *LYColorWithHex(long hexColor);
IMP LSYSwizzleInstanceSelector(Class aClass, SEL original, IMP replacement);
IMP LSYSwizzleClassSelector(Class clazz, SEL selector, IMP newImplementation);


typedef NS_ENUM(NSUInteger, LYArtistNetworkType) {
    LYArtistNetworkTypeNONE = 0,
    LYArtistNetworkType2G   = 1,
    LYArtistNetworkType3G   = 2,
    LYArtistNetworkType4G   = 3,
    LYArtistNetworkTypeWIFI = 5,
};
@interface LYPublicMethod : NSObject


#pragma mark ---- 整合 Util ------------

+ (BOOL)iPhone6Puls;
+ (BOOL)isPad;
+ (NSString *)platform;
+ (NSString *)getShortVersionString;
+ (NSString *)getBuildVersionString;
+ (NSString *)getBuildVersionDebugContainTestString;
+ (NSString *)currentOSVersion;
+ (LYArtistNetworkType)getNetworkTypeFromStatusBar;
+ (NSString *)getNetworkTypeStrFromStatusBar;
+ (NSString *)getSubscriberCellularProviderStr;

+ (void)swizzleClassMethod:(Class)aClass swizzleSelector:(SEL)originSelector withSelector:(SEL)swizzleSelector;
+ (void)swizzleInstanceMethod:(Class)aClass swizzleSelector:(SEL)originSelector withSelector:(SEL)swizzleSelector;


/**
 *  @brief  检测应用是否可以访问相册（相机）
 */
+ (BOOL)checkPhotoLibraryAuthorizationStatus;

+ (BOOL)checkCameraAuthorizationStatus;

/**
 *  获取消除后的表情文字混合内容
 *
 *  @param content content description
 *
 *  @return return value description
 */
+ (NSString *)getReduceStringByContent:(NSString *)content;


+ (void)loginRongLianYunWithLoginInfo:(LYUserInfoModel *)loginUserInfo;

@end

